"""配置证照效期提醒时间"""

from odoo import models, api, fields
from odoo.tools import float_compare
from odoo.exceptions import UserError, ValidationError


class GspLicenseSetting(models.TransientModel):
    _inherit = 'res.config.settings'

    remind_days = fields.Integer('证照有效期预警天数', readonly=False,
                                 related="company_id.remind_days")


class Company(models.Model):
    _inherit = "res.company"

    remind_days = fields.Integer('证照有效期预警天数', default=3)


class Users(models.Model):
    _inherit = 'res.users'

    # 默认使用站内信
    notification_type = fields.Selection(default='inbox')